
/*--------------------------------------------------------------------------
		File Name	: m_crc16.h
		Author		: liu
		Description	: 
		Date		: 2015-4-25 10:38:06
--------------------------------------------------------------------------*/

#ifndef  M_CRC16_H__
#define  M_CRC16_H__

/*----------------------------------------------------------------------
 - 函数功能: CRC-16算法    
 - 输入参数: pDataIn: 数据地址     
 -           iLenIn: 数据长度                
 - 返回参数: 2字节crc16校验值   
 - 用时：50字节=72us   
 ----------------------------------------------------------------------*/
unsigned short m_crc16(const unsigned char* pDataIn, int iLenIn);

/**
 * @brief 分开计算crc
 * 
 * @param wResult 第一次传入 ~0;
 * @param char 
 * @param iLenIn 
 * @return unsigned short 
 */
unsigned short m_crc16_continue(unsigned short wResult, const unsigned char* pDataIn, int iLenIn) ;

#endif

